package com.wd.tech.adapter.Xiaoxi;

import com.wd.tech.fragment.Xiaoxin.ContactFragment;
import com.wd.tech.fragment.Xiaoxin.NewsFragment;

import java.util.ArrayList;
import java.util.List;

import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.FragmentPagerAdapter;

/**
 * Created by Android Studio.
 * User: Administrator廖述东
 * Date: 2020/7/17
 * Time: 21:57
 */
public class TabAdapter extends FragmentPagerAdapter {
    private List<Fragment> mFragmentList=new ArrayList<>();

    public TabAdapter(FragmentManager fm,List<Fragment> fragmentList) {
        super(fm);
        this.mFragmentList=fragmentList;
    }

    @Override
    public Fragment getItem(int position) {
        return mFragmentList.get(position);
    }

    @Override
    public int getCount() {
        return mFragmentList.size();
    }

}
